Loaded question. This depends on the Cisco switch and it's a
very technically detailed answer - unique to every switch model.
The short answer is that switches that are "modular" allow you to
have routing functionality inside one or more "modules" or "cards"
of the switch. Some switches allow routing to occur on each "line
card", other solution allow a switch to share a single "card" to do
all the routing for the entire switch. Routing and switching can be
configured via a single terminal interface session - known as
"native", whereas some switches separate the routing terminal and
switching terminal - known as "hybrid". If that isn't enough info,
go to cisco.com and use their search engine to find the
"installation guides" of your model.